package com.geilizu.dom.dao;

import com.geilizu.dom.dto.SearchDoAdminDto;
import com.geilizu.dom.dto.UserInfo;
import com.geilizu.dom.entity.DormitoryAdmin;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * (DormitoryAdmin)表数据库访问层
 *
 * @author makejava
 * @since 2022-07-12 15:08:42
 */
public interface DormitoryAdminDao {

    /**
     * 登录验证
     * @param username
     * @param password
     * @return
     */
    DormitoryAdmin login(@Param("username") String username,@Param("password") String password);



    List<DormitoryAdmin> queryAll(@Param("page") Integer page,@Param("size") Integer size);

    Long queryAllCount();


    /**
     * 查询宿管功能
     * @param search
     * @return
     */
    List<DormitoryAdmin> search(@Param("search") SearchDoAdminDto search);

    /**
     * 查询宿管的数量
     * @param search
     * @return
     */
    Long searchCount(@Param("search") SearchDoAdminDto search);

    boolean save(DormitoryAdmin dormitoryAdmin);

    Integer deleteById(@Param("id") Integer id);

    Integer updateById(DormitoryAdmin dormitoryAdmin);

    List<DormitoryAdmin> list();

    DormitoryAdmin findById(Integer id);
}

